package com.clcao.mybatis.common.constants.enums;

import lombok.Getter;

/**
 * @author clcao
 * @since 2025/3/11
 */
@Getter
public enum ExceptionEnum {
    INTERNAL_SERVER_ERROR("100500", "服务器内部错误"),
    BAD_REQUEST("100400", "请求参数错误"),
    UNAUTHORIZED("401", "未授权"),
    FORBIDDEN("403", "禁止访问"),
    NOT_FOUND("404", "资源不存在"),
    METHOD_NOT_ALLOWED("405", "请求方法不允许"),
    REQUEST_TIMEOUT("408", "请求超时"),
    TOO_MANY_REQUESTS("429", "请求过于频繁");


    private final String code;
    private final String message;

    ExceptionEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
